//
// Created by 吴喆 on 2020/3/8.
//

#ifndef SUMMER_EVENT_H
#define SUMMER_EVENT_H


#include "Animation.h"

class Event {
public:
    explicit Event(Animation* a):animation(a){

    };
    Animation *animation = nullptr;
    Event *next = nullptr;
    void doCheck() {
        checkFunc();
    };
    void setCheckFunc(std::function<void()> &&func) {
        checkFunc = func;
    }
    void refresh() {
        animation->refresh();
    }
private:
    std::function<void()> checkFunc;

};


#endif //SUMMER_EVENT_H
